<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">GENLSDATA</b>
<td valign="baseline" align="right" class="function"><a href="../data/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table>
  <p><b>Generates linearly separable binary data.</b></p>
  <hr>
<div class='code'><code>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Synopsis:</span></span><br>
<span class=help>&nbsp;&nbsp;data&nbsp;=&nbsp;genlsdata(dim,num_data,margin)</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;It&nbsp;generates&nbsp;randomly&nbsp;binary&nbsp;labeled&nbsp;vectors&nbsp;which&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;are&nbsp;linearly&nbsp;separable&nbsp;with&nbsp;prescribed&nbsp;margin.&nbsp;</span><br>
<span class=help>&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;dim&nbsp;[1x1]&nbsp;Data&nbsp;dimension.</span><br>
<span class=help>&nbsp;&nbsp;num_data&nbsp;[1x1]&nbsp;Number&nbsp;of&nbsp;generated&nbsp;data.</span><br>
<span class=help>&nbsp;&nbsp;margin&nbsp;[1x1]&nbsp;Minimal&nbsp;ensured&nbsp;margin&nbsp;(distance&nbsp;of&nbsp;the&nbsp;closest</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;vector&nbsp;to&nbsp;the&nbsp;separating&nbsp;hyperplane).</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;data&nbsp;[struct]&nbsp;Generated&nbsp;data:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.X&nbsp;[dim&nbsp;x&nbsp;num_data]&nbsp;Sample&nbsp;data.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.y&nbsp;[1&nbsp;x&nbsp;num_data]&nbsp;Data&nbsp;labels&nbsp;(1&nbsp;or&nbsp;2).</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;[struct]&nbsp;Ground&nbsp;truth&nbsp;linear&nbsp;classifier:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.W&nbsp;[dim&nbsp;x&nbsp;1]&nbsp;Normal&nbsp;vector&nbsp;of&nbsp;separating&nbsp;hyperplane.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.b&nbsp;[1x1]&nbsp;Bias&nbsp;of&nbsp;the&nbsp;hyperplane.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Example:</span></span><br>
<span class=help>&nbsp;&nbsp;data&nbsp;=&nbsp;genlsdata(2,50,1);</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;ekozinec(&nbsp;data&nbsp;);</span><br>
<span class=help>&nbsp;&nbsp;model.margin</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;ppatterns(data);&nbsp;pline(model);</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=also_field>See also </span><span class=also></span><br>
<span class=help><span class=also>&nbsp;&nbsp;<a href = "../linear/finite/perceptron.html" target="mdsbody">PERCEPTRON</a>,&nbsp;<a href = "../linear/finite/ekozinec.html" target="mdsbody">EKOZINEC</a>,&nbsp;<a href = "../linear/linclass.html" target="mdsbody">LINCLASS</a>,&nbsp;SVM.</span><br>
<span class=help></span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../data/list/genlsdata.html">genlsdata.m</a>
  <p><b class="info_field">About: </b>  Statistical Pattern Recognition Toolbox<br>
 (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac<br>
 <a href="http://www.cvut.cz">Czech Technical University Prague</a><br>
 <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a><br>
 <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a><br>

  <p><b class="info_field">Modifications: </b> <br>
 3-may-2004, VF<br>
 16-Feb-2003, VF<br>
 26-feb-2001 V.Franc<br>

</body>
</html>
